import request from '@/utils/request';

export async function getDriveParaCalByPage(params: any) {
  return request('/api/drivePara/getDriveParaCalByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addDriveParaCal(params: any) {
  return request('/api/drivePara/addDriveParaCal', {
    method: 'POST',
    data: params,
  });
}

export async function delDriveParaCal(params: any) {
  return request('/api/drivePara/delDriveParaCal', {
    method: 'POST',
    data: params,
  });
}

export async function delDriveParasCal(params: any) {
  return request('/api/drivePara/delDriveParasCal', {
    method: 'POST',
    data: params,
  });
}

export async function updateDriveParaCal(params: any) {
  return request('/api/drivePara/updateDriveParaCal', {
    method: 'POST',
    data: params,
  });
}

export async function uploadDriveParaCalExcel(params: any) {
  return request('/api/drivePara/uploadDriveParaCalExcel', {
    method: 'POST',
    requestType: 'form',
    data: params,
  });
}

/**
 * 下载excel
 * @param params
 * @returns
 */
export async function driveParaCalExcelExport() {
  return request('/api/drivePara/driveParaCalExcelExport', {
    method: 'POST',
    responseType: 'blob',
  });
}
